Integrand size = 21, antiderivative size = 82 \[ \int \csc ^4(e+f x) (a+b \sin (e+f x))^2 \, dx=-\frac {a b \text {arctanh}(\cos (e+f x))}{f}-\frac {\left (2 a^2+3 b^2\right ) \cot (e+f x)}{3 f}-\frac {a b \cot (e+f x) \csc (e+f x)}{f}-\frac {a^2 \cot (e+f x) \csc ^2(e+f x)}{3 f} \]
-a*b*arctanh(cos(f*x+e))/f-1/3*(2*a^2+3*b^2)*cot(f*x+e)/f-a*b*cot(f*x+e)*c sc(f*x+e)/f-1/3*a^2*cot(f*x+e)*csc(f*x+e)^2/f
Time = 0.18 (sec) , antiderivative size = 132, normalized size of antiderivative = 1.61 \[ \int \csc ^4(e+f x) (a+b \sin (e+f x))^2 \, dx=-\frac {2 a^2 \cot (e+f x)}{3 f}-\frac {b^2 \cot (e+f x)}{f}-\frac {a b \csc ^2\left (\frac {1}{2} (e+f x)\right )}{4 f}-\frac {a^2 \cot (e+f x) \csc ^2(e+f x)}{3 f}-\frac {a b \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )}{f}+\frac {a b \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )}{f}+\frac {a b \sec ^2\left (\frac {1}{2} (e+f x)\right )}{4 f} \]
(-2*a^2*Cot[e + f*x])/(3*f) - (b^2*Cot[e + f*x])/f - (a*b*Csc[(e + f*x)/2] ^2)/(4*f) - (a^2*Cot[e + f*x]*Csc[e + f*x]^2)/(3*f) - (a*b*Log[Cos[(e + f* x)/2]])/f + (a*b*Log[Sin[(e + f*x)/2]])/f + (a*b*Sec[(e + f*x)/2]^2)/(4*f)
Time = 0.52 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.06, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.476, Rules used = {3042, 3268, 3042, 3491, 3042, 4254, 24, 4255, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \csc ^4(e+f x) (a+b \sin (e+f x))^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+b \sin (e+f x))^2}{\sin (e+f x)^4}dx\) |
\(\Big \downarrow \) 3268 |
\(\displaystyle \int \csc ^4(e+f x) \left (a^2+b^2 \sin ^2(e+f x)\right )dx+2 a b \int \csc ^3(e+f x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a^2+b^2 \sin (e+f x)^2}{\sin (e+f x)^4}dx+2 a b \int \csc (e+f x)^3dx\) |
\(\Big \downarrow \) 3491 |
\(\displaystyle \frac {1}{3} \left (2 a^2+3 b^2\right ) \int \csc ^2(e+f x)dx+2 a b \int \csc (e+f x)^3dx-\frac {a^2 \cot (e+f x) \csc ^2(e+f x)}{3 f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{3} \left (2 a^2+3 b^2\right ) \int \csc (e+f x)^2dx+2 a b \int \csc (e+f x)^3dx-\frac {a^2 \cot (e+f x) \csc ^2(e+f x)}{3 f}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle -\frac {\left (2 a^2+3 b^2\right ) \int 1d\cot (e+f x)}{3 f}+2 a b \int \csc (e+f x)^3dx-\frac {a^2 \cot (e+f x) \csc ^2(e+f x)}{3 f}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle 2 a b \int \csc (e+f x)^3dx-\frac {\left (2 a^2+3 b^2\right ) \cot (e+f x)}{3 f}-\frac {a^2 \cot (e+f x) \csc ^2(e+f x)}{3 f}\) |
\(\Big \downarrow \) 4255 |
\(\displaystyle 2 a b \left (\frac {1}{2} \int \csc (e+f x)dx-\frac {\cot (e+f x) \csc (e+f x)}{2 f}\right )-\frac {\left (2 a^2+3 b^2\right ) \cot (e+f x)}{3 f}-\frac {a^2 \cot (e+f x) \csc ^2(e+f x)}{3 f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle 2 a b \left (\frac {1}{2} \int \csc (e+f x)dx-\frac {\cot (e+f x) \csc (e+f x)}{2 f}\right )-\frac {\left (2 a^2+3 b^2\right ) \cot (e+f x)}{3 f}-\frac {a^2 \cot (e+f x) \csc ^2(e+f x)}{3 f}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle -\frac {\left (2 a^2+3 b^2\right ) \cot (e+f x)}{3 f}-\frac {a^2 \cot (e+f x) \csc ^2(e+f x)}{3 f}+2 a b \left (-\frac {\text {arctanh}(\cos (e+f x))}{2 f}-\frac {\cot (e+f x) \csc (e+f x)}{2 f}\right )\) |
-1/3*((2*a^2 + 3*b^2)*Cot[e + f*x])/f - (a^2*Cot[e + f*x]*Csc[e + f*x]^2)/ (3*f) + 2*a*b*(-1/2*ArcTanh[Cos[e + f*x]]/f - (Cot[e + f*x]*Csc[e + f*x])/ (2*f))
3.2.64.3.1 Defintions of rubi rules used
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)])^2, x_Symbol] :> Simp[2*c*(d/b) Int[(b*Sin[e + f*x])^(m + 1), x], x] + Int[(b*Sin[e + f*x])^m*(c^2 + d^2*Sin[e + f*x]^2), x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_) + (C_.)*sin[(e_.) + (f_.)*(x _)]^2), x_Symbol] :> Simp[A*Cos[e + f*x]*((b*Sin[e + f*x])^(m + 1)/(b*f*(m + 1))), x] + Simp[(A*(m + 2) + C*(m + 1))/(b^2*(m + 1)) Int[(b*Sin[e + f* x])^(m + 2), x], x] /; FreeQ[{b, e, f, A, C}, x] && LtQ[m, -1]
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[2*n]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 1.81 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.93
method | result | size |
derivativedivides | \(\frac {a^{2} \left (-\frac {2}{3}-\frac {\left (\csc ^{2}\left (f x +e \right )\right )}{3}\right ) \cot \left (f x +e \right )+2 a b \left (-\frac {\csc \left (f x +e \right ) \cot \left (f x +e \right )}{2}+\frac {\ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )}{2}\right )-b^{2} \cot \left (f x +e \right )}{f}\) | \(76\) |
default | \(\frac {a^{2} \left (-\frac {2}{3}-\frac {\left (\csc ^{2}\left (f x +e \right )\right )}{3}\right ) \cot \left (f x +e \right )+2 a b \left (-\frac {\csc \left (f x +e \right ) \cot \left (f x +e \right )}{2}+\frac {\ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )}{2}\right )-b^{2} \cot \left (f x +e \right )}{f}\) | \(76\) |
parallelrisch | \(\frac {24 \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right ) a b -\left (-\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+\cot \left (\frac {f x}{2}+\frac {e}{2}\right )\right ) \left (\left (\cot ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right ) a^{2}+a \left (a \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+6 b \right ) \cot \left (\frac {f x}{2}+\frac {e}{2}\right )+\left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right ) a^{2}+6 a b \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+9 a^{2}+12 b^{2}\right )}{24 f}\) | \(124\) |
risch | \(\frac {-2 i b^{2} {\mathrm e}^{4 i \left (f x +e \right )}+2 a b \,{\mathrm e}^{5 i \left (f x +e \right )}+4 i a^{2} {\mathrm e}^{2 i \left (f x +e \right )}+4 i b^{2} {\mathrm e}^{2 i \left (f x +e \right )}-\frac {4 i a^{2}}{3}-2 i b^{2}-2 a b \,{\mathrm e}^{i \left (f x +e \right )}}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{3}}+\frac {a b \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}{f}-\frac {a b \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}{f}\) | \(141\) |
norman | \(\frac {\frac {a b \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {a b \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}-\frac {a^{2}}{24 f}+\frac {a^{2} \left (\tan ^{10}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{24 f}-\frac {\left (5 a^{2}+6 b^{2}\right ) \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{12 f}+\frac {\left (5 a^{2}+6 b^{2}\right ) \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{12 f}-\frac {\left (11 a^{2}+12 b^{2}\right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{24 f}+\frac {\left (11 a^{2}+12 b^{2}\right ) \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{24 f}-\frac {a b \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{4 f}+\frac {a b \left (\tan ^{9}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{4 f}}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} \left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{2}}+\frac {a b \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}\) | \(249\) |
1/f*(a^2*(-2/3-1/3*csc(f*x+e)^2)*cot(f*x+e)+2*a*b*(-1/2*csc(f*x+e)*cot(f*x +e)+1/2*ln(-cot(f*x+e)+csc(f*x+e)))-b^2*cot(f*x+e))
Time = 0.31 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.82 \[ \int \csc ^4(e+f x) (a+b \sin (e+f x))^2 \, dx=-\frac {2 \, {\left (2 \, a^{2} + 3 \, b^{2}\right )} \cos \left (f x + e\right )^{3} - 6 \, a b \cos \left (f x + e\right ) \sin \left (f x + e\right ) + 3 \, {\left (a b \cos \left (f x + e\right )^{2} - a b\right )} \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) \sin \left (f x + e\right ) - 3 \, {\left (a b \cos \left (f x + e\right )^{2} - a b\right )} \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) \sin \left (f x + e\right ) - 6 \, {\left (a^{2} + b^{2}\right )} \cos \left (f x + e\right )}{6 \, {\left (f \cos \left (f x + e\right )^{2} - f\right )} \sin \left (f x + e\right )} \]
-1/6*(2*(2*a^2 + 3*b^2)*cos(f*x + e)^3 - 6*a*b*cos(f*x + e)*sin(f*x + e) + 3*(a*b*cos(f*x + e)^2 - a*b)*log(1/2*cos(f*x + e) + 1/2)*sin(f*x + e) - 3 *(a*b*cos(f*x + e)^2 - a*b)*log(-1/2*cos(f*x + e) + 1/2)*sin(f*x + e) - 6* (a^2 + b^2)*cos(f*x + e))/((f*cos(f*x + e)^2 - f)*sin(f*x + e))
\[ \int \csc ^4(e+f x) (a+b \sin (e+f x))^2 \, dx=\int \left (a + b \sin {\left (e + f x \right )}\right )^{2} \csc ^{4}{\left (e + f x \right )}\, dx \]
Time = 0.20 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.09 \[ \int \csc ^4(e+f x) (a+b \sin (e+f x))^2 \, dx=\frac {3 \, a b {\left (\frac {2 \, \cos \left (f x + e\right )}{\cos \left (f x + e\right )^{2} - 1} - \log \left (\cos \left (f x + e\right ) + 1\right ) + \log \left (\cos \left (f x + e\right ) - 1\right )\right )} - \frac {6 \, b^{2}}{\tan \left (f x + e\right )} - \frac {2 \, {\left (3 \, \tan \left (f x + e\right )^{2} + 1\right )} a^{2}}{\tan \left (f x + e\right )^{3}}}{6 \, f} \]
1/6*(3*a*b*(2*cos(f*x + e)/(cos(f*x + e)^2 - 1) - log(cos(f*x + e) + 1) + log(cos(f*x + e) - 1)) - 6*b^2/tan(f*x + e) - 2*(3*tan(f*x + e)^2 + 1)*a^2 /tan(f*x + e)^3)/f
Time = 0.31 (sec) , antiderivative size = 156, normalized size of antiderivative = 1.90 \[ \int \csc ^4(e+f x) (a+b \sin (e+f x))^2 \, dx=\frac {a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 6 \, a b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 24 \, a b \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) \right |}\right ) + 9 \, a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 12 \, b^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - \frac {44 \, a b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 9 \, a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 12 \, b^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 6 \, a b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + a^{2}}{\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3}}}{24 \, f} \]
1/24*(a^2*tan(1/2*f*x + 1/2*e)^3 + 6*a*b*tan(1/2*f*x + 1/2*e)^2 + 24*a*b*l og(abs(tan(1/2*f*x + 1/2*e))) + 9*a^2*tan(1/2*f*x + 1/2*e) + 12*b^2*tan(1/ 2*f*x + 1/2*e) - (44*a*b*tan(1/2*f*x + 1/2*e)^3 + 9*a^2*tan(1/2*f*x + 1/2* e)^2 + 12*b^2*tan(1/2*f*x + 1/2*e)^2 + 6*a*b*tan(1/2*f*x + 1/2*e) + a^2)/t an(1/2*f*x + 1/2*e)^3)/f
Time = 6.13 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.66 \[ \int \csc ^4(e+f x) (a+b \sin (e+f x))^2 \, dx=\frac {a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3}{24\,f}+\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (\frac {3\,a^2}{8}+\frac {b^2}{2}\right )}{f}-\frac {{\mathrm {cot}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (3\,a^2+4\,b^2\right )+\frac {a^2}{3}+2\,a\,b\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}{8\,f}+\frac {a\,b\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2}{4\,f}+\frac {a\,b\,\ln \left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}{f} \]